package com.franklin.ideaplugin.maphelper.resolver;

import com.franklin.ideaplugin.maphelper.beans.colmember.IColMember;
import com.franklin.ideaplugin.maphelper.col.declaration.IColDeclaration;
import com.intellij.psi.PsiElement;

import java.util.Collection;

/**
 * 集合成员解析器
 *
 * @author Ye Junhui
 * @since 2024/3/5
 */
public interface IColMemberResolver {

    /**
     * 是否执行解析
     *
     * @param colDeclaration
     * @return
     */
    boolean supports(IColDeclaration colDeclaration);

    /**
     * 解析集合成员
     *
     * @param psiExpression
     * @param colDeclaration
     * @return
     */
    Collection<IColMember> resolveColMembers(PsiElement psiExpression, IColDeclaration colDeclaration);

    /**
     * 获取工厂
     * @return
     */
    AbstractColMemberResolverFactory getColMemberResolverFactory();
}
